<?php 
      session_start();
        if(!$_SESSION['log']){session_destroy();
        echo "<meta http-equiv='refresh' content='1;url=index.php'>";
      }
      ?>

<!DOCTYPE HTML SYSTEM>
<html>
<head>
<title>Test</title>
<style type="text/css">
table.table,td, th {
	border-width: 1px;
	border-spacing: 2px;
	border-style: outset;
	border-color: gray;
	border-collapse: separate;
	background-color: white;
}
</style>
</head>
<body>
<a href="index.php">1. krok</a>
<a href="form2.php">2. krok</a>
<a href="form3.php">3. krok</a>
<a href="form4.php">4. krok</a>
<a href="out.php">5. krok</a>
<?php
      $con=mysql_connect("localhost","reimemic","kee7baef");
// Check connection
if (!$con)
  {
  echo "Failed to connect to MySQL: " . mysql_connect_error();
  }

// Create database
mysql_select_db("reimemic");

 
$result = mysql_query("SELECT * FROM `TrololoObjednavka` WHERE 1", $con) ; 



echo "<table class=\"table\">";
   	echo "<td>";
			echo "Jmeno";
			echo "</td>";
			echo "<td>";
			echo "Objem" ;
			echo "</td>";
			echo "<td>";
      echo "Pocet Dveri" ;
			echo "</td>";
			echo "<td>";
			echo "Barva" ;
			echo "</td>";
      echo "<td>";
			echo "Cena" ;
			echo "</td>";
			echo "</tr>";
      while ($current=mysql_fetch_array($result)){
      echo "<tr>";
		  echo "<td>";
			echo $current['Jmeno'];
			echo "</td>";
			echo "<td>";
			echo $current['Objem'];
			echo "</td>";
			echo "<td>";
      echo $current['Dvere'];
			echo "</td>";
			echo "<td>";
			echo $current['Barva'];
			echo "</td>";
      echo "<td>";
			echo $current['Cena'];
			echo "</td>";
			echo "</tr>";
      }
echo"</table>"; 
unset($_SESSION['log']);
session_destroy();
mysql_close($con);
?>

 </body>
</html>